package VeLaBai;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

//import BoBai.NguoiChoi;

public class VeBai  extends JPanel {

	static private String labai = "b2fv.png";
	private Image image;
	private int x,y;

	public VeBai()
	{
		//setDoubleBuffered(true);
		ImageIcon ii = new ImageIcon(this.getClass().getResource(labai));
		
		image = ii.getImage();
		
		x = 50;
		y = 150;
	}

	@Override
	public void paint(Graphics g) {
		// TODO Auto-generated method stub
		super.paint(g);
		
		//ve ben trai
		for(int i = 0 ; i < 13;i++)
		{
		Graphics2D g2d = (Graphics2D)g;
        g2d.drawImage(image, x, y, this);
        y = y + 25;
		}
		
		// ve ben tren
		x = 200;
		y = 50;
		for(int i = 0 ; i < 13;i++)
		{
		Graphics2D g2d2 = (Graphics2D)g;
        g2d2.drawImage(image, x, y, this);
        x = x + 35;
		}
		
		// ve ben phai
		x = 750;
		y = 150;
		for(int i = 0 ; i < 13;i++)
		{
		Graphics2D g2d4 = (Graphics2D)g;
        g2d4.drawImage(image, x, y, this);
        y = y + 25;
		}

		//ve bai cua nguoi choi
		x = 200;
		y = 550;
		
		
		for(int i = 0 ; i < DSLaBai.Dslabai.size() ;i++)
		{
			ImageIcon ii = new ImageIcon(this.getClass().getResource(DSLaBai.Dslabai.get(i)));		
		Image	image1 = ii.getImage();
			Graphics2D g2d5 = (Graphics2D)g;
	        g2d5.drawImage(image1, x, y, this);
	        x = x + 35;
		}
	}
	
	
}
